package com.lujianfei.powerinput.database;

import android.os.Parcel;
import android.os.Parcelable;

import com.orm.SugarRecord;
import com.orm.dsl.Column;
import com.orm.dsl.Table;

@Table(name = "TemplateModel")
public class TemplateModel extends SugarRecord implements Parcelable {

    @Column(name = "name")
    private
    String name;

    public TemplateModel() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    protected TemplateModel(Parcel in) {
        setId(in.readLong());
        name = in.readString();
    }

    public static final Creator<TemplateModel> CREATOR = new Creator<TemplateModel>() {
        @Override
        public TemplateModel createFromParcel(Parcel in) {
            return new TemplateModel(in);
        }

        @Override
        public TemplateModel[] newArray(int size) {
            return new TemplateModel[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeLong(getId());
        parcel.writeString(name);
    }
}
